/*
 Navicat MySQL Data Transfer

 Source Server         : MacBook本地
 Source Server Type    : MySQL
 Source Server Version : 80300 (8.3.0)
 Source Host           : localhost:3306
 Source Schema         : study

 Target Server Type    : MySQL
 Target Server Version : 80300 (8.3.0)
 File Encoding         : 65001

 Date: 17/06/2024 23:38:32
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for Course
-- ----------------------------
DROP TABLE IF EXISTS `Course`;
CREATE TABLE `Course` (
  `id` int NOT NULL AUTO_INCREMENT,
  `course_name` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` text COLLATE utf8mb4_unicode_ci,
  `category_id` int DEFAULT NULL,
  `teacher_id` int DEFAULT NULL,
  `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `category_id` (`category_id`),
  KEY `teacher_id` (`teacher_id`),
  CONSTRAINT `course_ibfk_1` FOREIGN KEY (`category_id`) REFERENCES `CourseCategory` (`id`),
  CONSTRAINT `course_ibfk_2` FOREIGN KEY (`teacher_id`) REFERENCES `User` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- ----------------------------
-- Records of Course
-- ----------------------------
BEGIN;
INSERT INTO `Course` (`id`, `course_name`, `description`, `category_id`, `teacher_id`, `create_time`, `update_time`) VALUES (1, '高等数学', '深入探讨微积分、线性代数等高等数学领域。', 1, 2, '2024-06-17 14:28:15', '2024-06-17 14:28:15');
INSERT INTO `Course` (`id`, `course_name`, `description`, `category_id`, `teacher_id`, `create_time`, `update_time`) VALUES (2, '现代物理', '探索量子力学、相对论等现代物理学的基本概念。', 4, 2, '2024-06-17 14:28:15', '2024-06-17 14:28:15');
INSERT INTO `Course` (`id`, `course_name`, `description`, `category_id`, `teacher_id`, `create_time`, `update_time`) VALUES (3, '生物技术导论', '介绍生物技术的基础理论和应用，包括基因编辑和生物制药。', 5, 2, '2024-06-17 14:28:15', '2024-06-17 14:28:15');
INSERT INTO `Course` (`id`, `course_name`, `description`, `category_id`, `teacher_id`, `create_time`, `update_time`) VALUES (4, '计算机科学基础', '学习计算机科学的基本原理，包括算法、数据结构和编程语言。', 6, 2, '2024-06-17 14:28:15', '2024-06-17 14:28:15');
INSERT INTO `Course` (`id`, `course_name`, `description`, `category_id`, `teacher_id`, `create_time`, `update_time`) VALUES (5, '人工智能导论', 'This course provides an overview of artificial intelligence, including machine learning, neural networks, and natural language processing.', 1, 1, '2024-06-17 22:21:20', '2024-06-17 22:21:20');
COMMIT;

-- ----------------------------
-- Table structure for CourseCategory
-- ----------------------------
DROP TABLE IF EXISTS `CourseCategory`;
CREATE TABLE `CourseCategory` (
  `id` int NOT NULL AUTO_INCREMENT,
  `category_name` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` text COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`id`),
  UNIQUE KEY `category_name` (`category_name`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- ----------------------------
-- Records of CourseCategory
-- ----------------------------
BEGIN;
INSERT INTO `CourseCategory` (`id`, `category_name`, `description`) VALUES (1, '数学', '不会就是不会！');
INSERT INTO `CourseCategory` (`id`, `category_name`, `description`) VALUES (2, '英语', '阿伯茨的');
INSERT INTO `CourseCategory` (`id`, `category_name`, `description`) VALUES (3, '化学', '炸这个炸！');
INSERT INTO `CourseCategory` (`id`, `category_name`, `description`) VALUES (4, '物理', '爱因斯坦大战波尔');
INSERT INTO `CourseCategory` (`id`, `category_name`, `description`) VALUES (5, '生物', '哈哈');
INSERT INTO `CourseCategory` (`id`, `category_name`, `description`) VALUES (6, '计算机科学', '天坑！');
COMMIT;

-- ----------------------------
-- Table structure for CourseResource
-- ----------------------------
DROP TABLE IF EXISTS `CourseResource`;
CREATE TABLE `CourseResource` (
  `id` int NOT NULL AUTO_INCREMENT,
  `course_id` int DEFAULT NULL,
  `resource_type` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `resource_path` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `upload_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `course_id` (`course_id`),
  CONSTRAINT `courseresource_ibfk_1` FOREIGN KEY (`course_id`) REFERENCES `Course` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- ----------------------------
-- Records of CourseResource
-- ----------------------------
BEGIN;
INSERT INTO `CourseResource` (`id`, `course_id`, `resource_type`, `resource_path`, `upload_time`) VALUES (1, 1, 'video', '/path/to/higher_math_video1.mp4', '2024-06-17 14:31:34');
INSERT INTO `CourseResource` (`id`, `course_id`, `resource_type`, `resource_path`, `upload_time`) VALUES (2, 1, 'document', '/path/to/higher_math_syllabus.pdf', '2024-06-17 14:31:34');
INSERT INTO `CourseResource` (`id`, `course_id`, `resource_type`, `resource_path`, `upload_time`) VALUES (3, 2, 'presentation', '/path/to/modern_physics_lecture.pptx', '2024-06-17 14:31:34');
INSERT INTO `CourseResource` (`id`, `course_id`, `resource_type`, `resource_path`, `upload_time`) VALUES (4, 3, 'image', '/path/to/biotech_diagram.png', '2024-06-17 14:31:34');
INSERT INTO `CourseResource` (`id`, `course_id`, `resource_type`, `resource_path`, `upload_time`) VALUES (5, 4, 'code', '/path/to/computer_science_code_samples.zip', '2024-06-17 14:31:34');
COMMIT;

-- ----------------------------
-- Table structure for LearningData
-- ----------------------------
DROP TABLE IF EXISTS `LearningData`;
CREATE TABLE `LearningData` (
  `id` int NOT NULL AUTO_INCREMENT,
  `student_id` int DEFAULT NULL,
  `course_id` int DEFAULT NULL,
  `study_time` decimal(10,2) DEFAULT NULL,
  `accuracy` decimal(5,2) DEFAULT NULL,
  `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `student_id` (`student_id`),
  KEY `course_id` (`course_id`),
  CONSTRAINT `learningdata_ibfk_1` FOREIGN KEY (`student_id`) REFERENCES `User` (`id`),
  CONSTRAINT `learningdata_ibfk_2` FOREIGN KEY (`course_id`) REFERENCES `Course` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- ----------------------------
-- Records of LearningData
-- ----------------------------
BEGIN;
INSERT INTO `LearningData` (`id`, `student_id`, `course_id`, `study_time`, `accuracy`, `create_time`) VALUES (1, 3, 1, 2.00, 95.00, '2024-06-17 14:33:38');
INSERT INTO `LearningData` (`id`, `student_id`, `course_id`, `study_time`, `accuracy`, `create_time`) VALUES (2, 3, 2, 1.50, 85.00, '2024-06-17 14:33:38');
INSERT INTO `LearningData` (`id`, `student_id`, `course_id`, `study_time`, `accuracy`, `create_time`) VALUES (3, 3, 3, 3.00, 90.00, '2024-06-17 14:33:38');
INSERT INTO `LearningData` (`id`, `student_id`, `course_id`, `study_time`, `accuracy`, `create_time`) VALUES (4, 3, 4, 4.00, 98.00, '2024-06-17 14:33:38');
COMMIT;

-- ----------------------------
-- Table structure for LearningProgress
-- ----------------------------
DROP TABLE IF EXISTS `LearningProgress`;
CREATE TABLE `LearningProgress` (
  `id` int NOT NULL AUTO_INCREMENT,
  `student_id` int DEFAULT NULL,
  `course_id` int DEFAULT NULL,
  `progress` decimal(5,2) DEFAULT NULL,
  `update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `student_id` (`student_id`),
  KEY `course_id` (`course_id`),
  CONSTRAINT `learningprogress_ibfk_1` FOREIGN KEY (`student_id`) REFERENCES `User` (`id`),
  CONSTRAINT `learningprogress_ibfk_2` FOREIGN KEY (`course_id`) REFERENCES `Course` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- ----------------------------
-- Records of LearningProgress
-- ----------------------------
BEGIN;
INSERT INTO `LearningProgress` (`id`, `student_id`, `course_id`, `progress`, `update_time`) VALUES (9, 3, 1, 60.00, '2024-06-17 14:36:04');
INSERT INTO `LearningProgress` (`id`, `student_id`, `course_id`, `progress`, `update_time`) VALUES (10, 3, 2, 45.00, '2024-06-17 14:36:04');
INSERT INTO `LearningProgress` (`id`, `student_id`, `course_id`, `progress`, `update_time`) VALUES (11, 3, 3, 90.00, '2024-06-17 14:36:04');
INSERT INTO `LearningProgress` (`id`, `student_id`, `course_id`, `progress`, `update_time`) VALUES (12, 3, 4, 75.00, '2024-06-17 14:36:04');
COMMIT;

-- ----------------------------
-- Table structure for Permission
-- ----------------------------
DROP TABLE IF EXISTS `Permission`;
CREATE TABLE `Permission` (
  `id` int NOT NULL AUTO_INCREMENT,
  `permission_name` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
  `description` text COLLATE utf8mb4_unicode_ci,
  PRIMARY KEY (`id`),
  UNIQUE KEY `permission_name` (`permission_name`)
) ENGINE=InnoDB AUTO_INCREMENT=22 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- ----------------------------
-- Records of Permission
-- ----------------------------
BEGIN;
INSERT INTO `Permission` (`id`, `permission_name`, `description`) VALUES (1, 'VIEW_COURSES', '查看课程');
INSERT INTO `Permission` (`id`, `permission_name`, `description`) VALUES (2, 'CREATE_COURSES', '创建课程');
INSERT INTO `Permission` (`id`, `permission_name`, `description`) VALUES (3, 'EDIT_COURSES', '修改课程');
INSERT INTO `Permission` (`id`, `permission_name`, `description`) VALUES (4, 'DELETE_COURSES', '删除课程');
INSERT INTO `Permission` (`id`, `permission_name`, `description`) VALUES (5, 'READ_COURSE_CATEGORIES', '查看课程分类');
INSERT INTO `Permission` (`id`, `permission_name`, `description`) VALUES (6, 'UPLOAD_COURSE_RESOURCES', '上传课程资源');
INSERT INTO `Permission` (`id`, `permission_name`, `description`) VALUES (7, 'DOWNLOAD_COURSE_RESOURCES', '下载课程资源');
INSERT INTO `Permission` (`id`, `permission_name`, `description`) VALUES (8, 'MANAGE_COURSE_RESOURCES', '管理课程资源');
INSERT INTO `Permission` (`id`, `permission_name`, `description`) VALUES (9, 'MANAGE_COURSE_PROGRESS', '管理课程进度');
INSERT INTO `Permission` (`id`, `permission_name`, `description`) VALUES (10, 'REGISTER_USER', '用户注册');
INSERT INTO `Permission` (`id`, `permission_name`, `description`) VALUES (11, 'LOGIN_USER', '用户登录');
INSERT INTO `Permission` (`id`, `permission_name`, `description`) VALUES (12, 'VIEW_USERS', '查看用户');
INSERT INTO `Permission` (`id`, `permission_name`, `description`) VALUES (13, 'MANAGE_USERS', '管理用户');
INSERT INTO `Permission` (`id`, `permission_name`, `description`) VALUES (14, 'MANAGE_TEACHERS', '管理教师');
INSERT INTO `Permission` (`id`, `permission_name`, `description`) VALUES (15, 'MANAGE_STUDENTS', '管理学生');
INSERT INTO `Permission` (`id`, `permission_name`, `description`) VALUES (16, 'MANAGE_PERMISSIONS', '管理权限');
INSERT INTO `Permission` (`id`, `permission_name`, `description`) VALUES (17, 'RECOMMEND_RESOURCES', '推荐学习资源');
INSERT INTO `Permission` (`id`, `permission_name`, `description`) VALUES (18, 'USE_NLP_QUESTION_ANSWERING', '使用自然语言处理实现智能问答');
INSERT INTO `Permission` (`id`, `permission_name`, `description`) VALUES (19, 'VIEW_LEARNING_DATA', '查看学习数据');
INSERT INTO `Permission` (`id`, `permission_name`, `description`) VALUES (20, 'GENERATE_ANALYSIS_REPORTS', '生成教学分析报告');
INSERT INTO `Permission` (`id`, `permission_name`, `description`) VALUES (21, 'VIEW_ANALYSIS_REPORTS', '查看教学分析报告');
COMMIT;

-- ----------------------------
-- Table structure for Recommendation
-- ----------------------------
DROP TABLE IF EXISTS `Recommendation`;
CREATE TABLE `Recommendation` (
  `id` int NOT NULL AUTO_INCREMENT,
  `student_id` int DEFAULT NULL,
  `resource_id` int DEFAULT NULL,
  `recommendation_reason` text COLLATE utf8mb4_unicode_ci,
  `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `student_id` (`student_id`),
  KEY `resource_id` (`resource_id`),
  CONSTRAINT `recommendation_ibfk_1` FOREIGN KEY (`student_id`) REFERENCES `User` (`id`),
  CONSTRAINT `recommendation_ibfk_2` FOREIGN KEY (`resource_id`) REFERENCES `CourseResource` (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- ----------------------------
-- Records of Recommendation
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for Role
-- ----------------------------
DROP TABLE IF EXISTS `Role`;
CREATE TABLE `Role` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '角色ID',
  `role_name` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '角色名称',
  `description` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL COMMENT '角色描述',
  PRIMARY KEY (`id`),
  UNIQUE KEY `role_name` (`role_name`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- ----------------------------
-- Records of Role
-- ----------------------------
BEGIN;
INSERT INTO `Role` (`id`, `role_name`, `description`) VALUES (1, 'ROLE_ADMIN', '这是系统的管理员');
INSERT INTO `Role` (`id`, `role_name`, `description`) VALUES (2, 'ROLE_TEACHER', '教师用户');
INSERT INTO `Role` (`id`, `role_name`, `description`) VALUES (3, 'ROLE_STU', '学生用户');
COMMIT;

-- ----------------------------
-- Table structure for RolePermission
-- ----------------------------
DROP TABLE IF EXISTS `RolePermission`;
CREATE TABLE `RolePermission` (
  `role_id` int NOT NULL,
  `permission_id` int NOT NULL,
  PRIMARY KEY (`role_id`,`permission_id`),
  KEY `permission_id` (`permission_id`),
  CONSTRAINT `rolepermission_ibfk_1` FOREIGN KEY (`role_id`) REFERENCES `Role` (`id`),
  CONSTRAINT `rolepermission_ibfk_2` FOREIGN KEY (`permission_id`) REFERENCES `Permission` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- ----------------------------
-- Records of RolePermission
-- ----------------------------
BEGIN;
INSERT INTO `RolePermission` (`role_id`, `permission_id`) VALUES (1, 1);
INSERT INTO `RolePermission` (`role_id`, `permission_id`) VALUES (2, 1);
INSERT INTO `RolePermission` (`role_id`, `permission_id`) VALUES (3, 1);
INSERT INTO `RolePermission` (`role_id`, `permission_id`) VALUES (2, 2);
INSERT INTO `RolePermission` (`role_id`, `permission_id`) VALUES (1, 3);
INSERT INTO `RolePermission` (`role_id`, `permission_id`) VALUES (2, 3);
INSERT INTO `RolePermission` (`role_id`, `permission_id`) VALUES (1, 4);
INSERT INTO `RolePermission` (`role_id`, `permission_id`) VALUES (2, 4);
INSERT INTO `RolePermission` (`role_id`, `permission_id`) VALUES (1, 5);
INSERT INTO `RolePermission` (`role_id`, `permission_id`) VALUES (2, 5);
INSERT INTO `RolePermission` (`role_id`, `permission_id`) VALUES (3, 5);
INSERT INTO `RolePermission` (`role_id`, `permission_id`) VALUES (1, 6);
INSERT INTO `RolePermission` (`role_id`, `permission_id`) VALUES (2, 6);
INSERT INTO `RolePermission` (`role_id`, `permission_id`) VALUES (1, 7);
INSERT INTO `RolePermission` (`role_id`, `permission_id`) VALUES (2, 7);
INSERT INTO `RolePermission` (`role_id`, `permission_id`) VALUES (3, 7);
INSERT INTO `RolePermission` (`role_id`, `permission_id`) VALUES (1, 8);
INSERT INTO `RolePermission` (`role_id`, `permission_id`) VALUES (2, 8);
INSERT INTO `RolePermission` (`role_id`, `permission_id`) VALUES (1, 9);
INSERT INTO `RolePermission` (`role_id`, `permission_id`) VALUES (2, 9);
INSERT INTO `RolePermission` (`role_id`, `permission_id`) VALUES (3, 9);
INSERT INTO `RolePermission` (`role_id`, `permission_id`) VALUES (1, 10);
INSERT INTO `RolePermission` (`role_id`, `permission_id`) VALUES (1, 11);
INSERT INTO `RolePermission` (`role_id`, `permission_id`) VALUES (1, 12);
INSERT INTO `RolePermission` (`role_id`, `permission_id`) VALUES (1, 13);
INSERT INTO `RolePermission` (`role_id`, `permission_id`) VALUES (1, 14);
INSERT INTO `RolePermission` (`role_id`, `permission_id`) VALUES (1, 15);
INSERT INTO `RolePermission` (`role_id`, `permission_id`) VALUES (1, 16);
INSERT INTO `RolePermission` (`role_id`, `permission_id`) VALUES (1, 17);
INSERT INTO `RolePermission` (`role_id`, `permission_id`) VALUES (3, 17);
INSERT INTO `RolePermission` (`role_id`, `permission_id`) VALUES (1, 18);
INSERT INTO `RolePermission` (`role_id`, `permission_id`) VALUES (3, 18);
INSERT INTO `RolePermission` (`role_id`, `permission_id`) VALUES (1, 19);
INSERT INTO `RolePermission` (`role_id`, `permission_id`) VALUES (2, 19);
INSERT INTO `RolePermission` (`role_id`, `permission_id`) VALUES (3, 19);
INSERT INTO `RolePermission` (`role_id`, `permission_id`) VALUES (1, 20);
INSERT INTO `RolePermission` (`role_id`, `permission_id`) VALUES (2, 20);
INSERT INTO `RolePermission` (`role_id`, `permission_id`) VALUES (1, 21);
INSERT INTO `RolePermission` (`role_id`, `permission_id`) VALUES (2, 21);
COMMIT;

-- ----------------------------
-- Table structure for TeachingAnalysisReport
-- ----------------------------
DROP TABLE IF EXISTS `TeachingAnalysisReport`;
CREATE TABLE `TeachingAnalysisReport` (
  `id` int NOT NULL AUTO_INCREMENT,
  `teacher_id` int DEFAULT NULL,
  `report_path` varchar(255) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
  `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`),
  KEY `teacher_id` (`teacher_id`),
  CONSTRAINT `teachinganalysisreport_ibfk_1` FOREIGN KEY (`teacher_id`) REFERENCES `User` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- ----------------------------
-- Records of TeachingAnalysisReport
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for User
-- ----------------------------
DROP TABLE IF EXISTS `User`;
CREATE TABLE `User` (
  `id` int NOT NULL AUTO_INCREMENT COMMENT '用户ID',
  `username` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '用户名',
  `nickname` varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '昵称',
  `password` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '密码',
  `email` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL COMMENT '电子邮箱',
  `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
  `update_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
  PRIMARY KEY (`id`),
  UNIQUE KEY `username` (`username`),
  UNIQUE KEY `email` (`email`)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- ----------------------------
-- Records of User
-- ----------------------------
BEGIN;
INSERT INTO `User` (`id`, `username`, `nickname`, `password`, `email`, `create_time`, `update_time`) VALUES (1, '32101073', '说好不鸽', '75K3eLr+dx6JJFuJ7LwIpEpOFmwGZZkRiB84PURz6U8=', '1612921077@qq.com', '2024-06-17 14:09:52', '2024-06-17 19:44:52');
INSERT INTO `User` (`id`, `username`, `nickname`, `password`, `email`, `create_time`, `update_time`) VALUES (2, '32101160', '是冒号不是太极', '75K3eLr+dx6JJFuJ7LwIpEpOFmwGZZkRiB84PURz6U8=', '123@qq.com', '2024-06-17 14:25:11', '2024-06-17 19:44:50');
INSERT INTO `User` (`id`, `username`, `nickname`, `password`, `email`, `create_time`, `update_time`) VALUES (3, '32101075', '胡哥', '75K3eLr+dx6JJFuJ7LwIpEpOFmwGZZkRiB84PURz6U8=', '234@qq.com', '2024-06-17 14:25:47', '2024-06-17 19:44:48');
INSERT INTO `User` (`id`, `username`, `nickname`, `password`, `email`, `create_time`, `update_time`) VALUES (8, '32101112', 'FuckMan', 'jZae727K08KaOmKSgOaGzww/XVqGr/PKEgIMkjrcbJI=', 'testuser@example.com', '2024-06-17 16:57:36', '2024-06-17 21:54:24');
INSERT INTO `User` (`id`, `username`, `nickname`, `password`, `email`, `create_time`, `update_time`) VALUES (9, 'testuser', 'Test User', '75K3eLr+dx6JJFuJ7LwIpEpOFmwGZZkRiB84PURz6U8=', 'test1@example.com', '2024-06-17 22:12:10', '2024-06-17 22:12:10');
COMMIT;

-- ----------------------------
-- Table structure for UserRole
-- ----------------------------
DROP TABLE IF EXISTS `UserRole`;
CREATE TABLE `UserRole` (
  `user_id` int NOT NULL COMMENT '用户ID',
  `role_id` int NOT NULL COMMENT '角色ID',
  PRIMARY KEY (`user_id`,`role_id`),
  KEY `role_id` (`role_id`),
  CONSTRAINT `userrole_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `User` (`id`),
  CONSTRAINT `userrole_ibfk_2` FOREIGN KEY (`role_id`) REFERENCES `Role` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

-- ----------------------------
-- Records of UserRole
-- ----------------------------
BEGIN;
INSERT INTO `UserRole` (`user_id`, `role_id`) VALUES (1, 1);
INSERT INTO `UserRole` (`user_id`, `role_id`) VALUES (1, 2);
INSERT INTO `UserRole` (`user_id`, `role_id`) VALUES (2, 2);
INSERT INTO `UserRole` (`user_id`, `role_id`) VALUES (1, 3);
INSERT INTO `UserRole` (`user_id`, `role_id`) VALUES (8, 3);
COMMIT;

SET FOREIGN_KEY_CHECKS = 1;
